﻿using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;

namespace WikiWiki.Models
{
    public class Wiki
    {
        public int ID { get; set; }

        public int userID { get; set; }

        [Required(ErrorMessage = "Title is required")]
        public string Title { get; set; }

        [Required(ErrorMessage = "Category must be specified")]
        public string Category { get; set; }

        [Required(ErrorMessage = "Description must be specified")]
        public string Description { get; set; }

        [DataType(DataType.Date)] 
        public DateTime ReleaseDate { get; set; }

        public int Count { get; set; }
    }

    public class WikiContext : DbContext
    {
        public DbSet<Wiki> Wiki { get; set; }
    }

}